Move test build into target
authorCarl Lerche <me@carllerche.com>
Thu, 20 Mar 2014 17:57:39 +0000 (10:57 -0700)
committerCarl Lerche <me@carllerche.com>
Thu, 20 Mar 2014 17:57:39 +0000 (10:57 -0700)
Makefile

index ddbf0d1f8bd40dfdde9aa524fb3dee8627f8e2ea..7a2100fd8f268fd7294e2496792018ae5dffa7f0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -48,17 +48,16 @@ $(BIN_TARGETS): target/%: src/bin/%.rs $(HAMMER) $(TOML) $(LIBCARGO)
 TEST_SRC = $(wildcard tests/*.rs)
 TEST_DEPS = $(DEPS) -L libs/hamcrest-rust/target
 
-tests/tests: $(BIN_TARGETS) $(HAMCREST) $(TEST_SRC)
-       $(RUSTC) --test --crate-type=lib $(TEST_DEPS) -Ltarget --out-dir tests tests/tests.rs
+target/tests: $(BIN_TARGETS) $(HAMCREST) $(TEST_SRC)
+       $(RUSTC) --test --crate-type=lib $(TEST_DEPS) -Ltarget --out-dir target tests/tests.rs
 
-test-integration: tests/tests
-       CARGO_BIN_PATH=$(PWD)/target/ tests/tests
+test-integration: target/tests
+       CARGO_BIN_PATH=$(PWD)/target/ $<
 
 test: test-integration
 
 clean:
        rm -rf target
-       rm -f tests/tests
 
 distclean: clean
        cd libs/hamcrest-rust && make clean